# include <bits/stdc++.h>
using namespace std;

string str, st;

char a;
int tms;

int main() { 
    freopen("zlxzf.in", "r", stdin);
    freopen("zlxzf.out", "w", stdout);
    getline(cin, st);
    getline(cin, str);
    int s = 0, k = 0;
    for(; !isdigit(st[s]); s++);
    for(; isdigit(st[s]); s++) k = k * 10 + st[s] - '0';
    for(int i = 0; i < (int) str.size(); i++) { 
        if(str[i] ^ a) { 
            a = str[i];
            tms = 1;
        } else tms++;
        if(tms == k) { 
            printf("%c\n", a);
            return 0;
        }
    }
    printf("No\n");
}
